//
//  WaterFlowLayout.h
//  UILessonWaterFlow
//
//  Created by 赵永泉 on 15/9/17.
//  Copyright (c) 2015年 蓝欧科技. All rights reserved.
//

#import <UIKit/UIKit.h>
@class WaterFlowLayout;

@protocol UICollectionViewDelegateWaterFlowLayout <NSObject>

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(WaterFlowLayout *)layout sizeForItemAtIndexPath:(NSIndexPath *)indexPath;

@end


@interface WaterFlowLayout : UICollectionViewFlowLayout

@property (nonatomic, assign) id<UICollectionViewDelegateWaterFlowLayout> delegate;


// 自定义初始化方法，指定有多少列
- (instancetype)initWithNumbersOfColumns:(NSUInteger)columns;



/**
 *  要自定义layout必须实现三个方法
 *  - (void)prepareLayout
 *  - (CGSize)collectionViewContentSize
 *  - (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect
 */

@end
